<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let num = +prompt('请输入一个数字')
        let num2 = +prompt('请输入另一个数字')
        let i = prompt('+ or - or * or /')
        switch(i){
            case '加':
                alert(num + num2)
            break
            case '减':
                alert(num - num2)
            break
            case '乘':
                alert(num * num2)
            break
            case '除':
                alert(num / num2)
            break
            default:
            alert('未找到')
                        }
        
    </script>
</body>
</html>